﻿/**
* @file helianji.h
* @brief this is a brief description
* @details this is the detail description.
* @author fulong 
* @data 2014/10/14
* @version 1.0
* @par Copyright (c):
* @par First build
*     version: fulong 
*     data: 2014/10/14
*/
#ifndef __HELIANJI_H__
#define __HELIANJI_H__
#include "../../hal_include/hal_types.h"


/*!< 摆臂电磁阀 */
//#define Y06 OUT6
/*!< 压带电磁阀 */
//#define Y05 OUT5
/*!< 钩针电磁阀 */
//#define Y04 OUT4
/*!< 后压轮电磁阀 */
//#define Y03 OUT3
/*!< 合模电磁阀 */
//#define Y02 OUT2
/*!< 蜂鸣器 */
//#define Y01 OUT1
//#define Y11 OUT11

/*!< 启动 */
#define X00 (!IN0)
/*!< 停止 */
#define X01 (!IN1)
/*!< 过插销感应开关 */
#define X02 (!IN2)
/*!< 过拉头感应开关 */
#define X03 (!IN3)
/*!< 拉头退到位感应开关 */
#define X04 (!IN4)
/*!< 上模到位感应开关 */
#define X05 (!IN5)
/*!< 下模到位感应开关 */
#define X06 (!IN6)
/*!< 插销到位感应开关 */
#define X07 (!IN7)
/*!< 方块感应 */
#define X10 (!IN10)

#define M00 modbus_inner_var[0].bit.bit0
#define M01 modbus_inner_var[0].bit.bit1
#define M02 modbus_inner_var[0].bit.bit2
#define M03 modbus_inner_var[0].bit.bit3
#define M04 modbus_inner_var[0].bit.bit4
#define M05 modbus_inner_var[0].bit.bit5
#define M06 modbus_inner_var[0].bit.bit6
#define M07 modbus_inner_var[0].bit.bit7
#define M15 modbus_inner_var[1].bit.bit7
#define M30 modbus_inner_var[3].bit.bit6

#define YM01 M33
#define YM02 M34
#define YM03 M35
#define YM04 M36
#define YM05 M37
#define YM06 M38

#define M32 modbus_inner_var[4].bit.bit0
#define M33 modbus_inner_var[4].bit.bit1
#define M34 modbus_inner_var[4].bit.bit2
#define M35 modbus_inner_var[4].bit.bit3
#define M36 modbus_inner_var[4].bit.bit4
#define M37 modbus_inner_var[4].bit.bit5
#define M38 modbus_inner_var[4].bit.bit6
#define M39 modbus_inner_var[4].bit.bit7


extern void auto_run(void);
extern void manual_action(void);
extern void action_check(void); 

#endif /* __HELIANJI_H__ */


